//
//  WMFullscreenVideoAd.h
//  WonderMobSDK
//
//  Created by zero on 2020/3/20.
//

#import <UIKit/UIKit.h>

#import "WMBaseAd.h"

NS_ASSUME_NONNULL_BEGIN

@class WMFullscreenVideoAd, WMAdId;

@protocol WMFullscreenVideoAdDelegate <NSObject>

@optional

/// 全屏广告数据加载成功回调
/// @param interstitialAd WMFullscreenVideoAd 实例
- (void)wm_fullscreenVideoAdDidLoad:(WMFullscreenVideoAd *)interstitialAd;

/// 全屏广告各种错误信息回调
/// @param interstitialAd WMFullscreenVideoAd 实例
/// @param error 具体错误信息
- (void)wm_fullscreenVideoAd:(WMFullscreenVideoAd *)interstitialAd
            didFailWithError:(NSError * _Nullable)error;
 
/// 全屏广告被点击
/// @param interstitialAd WMFullscreenVideoAd 实例
- (void)wm_fullscreenVideoAdDidClick:(WMFullscreenVideoAd *)interstitialAd;

/// 视频广告视频展示成功
/// @param rewardedVideoAd WMFullscreenVideoAd 实例
- (void)wm_fullscreenVideoAdDidRenderSuccess:(WMFullscreenVideoAd *)rewardedVideoAd;

/// 视频广告视频播放完成
/// @param rewardedVideoAd WMFullscreenVideoAd 实例
- (void)wm_fullscreenVideoAdDidPlayFinish:(WMFullscreenVideoAd *)rewardedVideoAd;

/// 全屏广告被关闭
/// @param interstitialAd WMFullscreenVideoAd 实例
- (void)wm_fullscreenVideoAdDidClose:(WMFullscreenVideoAd *)interstitialAd;

@end

@interface WMFullscreenVideoAd : WMBaseAd

/// 展示广告方法
/// @param rootViewController 用于 present 插屏广告 VC
/// @return 是否展示成功
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;

/// 委托对象
@property (nonatomic, weak) id<WMFullscreenVideoAdDelegate> delegate;

@end

NS_ASSUME_NONNULL_END
